#!/usr/bin/env python
# vim:fileencoding=utf-8

from __future__ import unicode_literals, division, absolute_import, print_function
from calibre.web.feeds.news import BasicNewsRecipe


class News(BasicNewsRecipe):
    title = '7x7'
    __author__ = 'bugmen00t'
    description = '7x7 - межрегиональный интернет-журнал'
    publisher = '7x7-journal.ru'
    category = 'news'
    cover_url = u'https://semnasem.org/site-specific/7x7-journal.ru/images/frontend/logo/logo-header.svg'
    language = 'ru'
    no_stylesheets = True
    remove_javascript = True
    auto_cleanup = False

    oldest_article = 14
    max_articles_per_feed = 30

    feeds = [
        ('7x7', 'https://semnasem.org/rss/default.xml'),
    ]

    remove_tags_before = dict(name='article', attrs={'class': 'article'})

    remove_tags_after = dict(name='div', attrs={'class': 'article__footer-wrap'})

    remove_tags = [
        dict(name='div', attrs={'class': 'article__footer-wrap'}),
        dict(name='div', attrs={'class': 'promolink-widget'})
    ]
